home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 44 / PC Actual CD 44.iso / Linux / Cygwin / full.exe / Disk1 / data1.cab / Tools / include / tk.h < prev   
Encoding:
C/C++ Source or Header  |  1998-12-04  |  60.0 KB  |  1,545 lines

  1. /*
  2.  * tk.h --
  3.  *
  4.  *    Declarations for Tk-related things that are visible
  5.  *    outside of the Tk module itself.
  6.  *
  7.  * Copyright (c) 1989-1994 The Regents of the University of California.
  8.  * Copyright (c) 1994 The Australian National University.
  9.  * Copyright (c) 1994-1997 Sun Microsystems, Inc.
  10.  *
  11.  * See the file "license.terms" for information on usage and redistribution
  12.  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  13.  *
  14.  * SCCS: @(#) tk.h 1.211 97/11/20 12:44:45
  15.  */
  16.  
  17. #ifndef _TK
  18. #define _TK
  19.  
  20. /*
  21.  * When version numbers change here, you must also go into the following files
  22.  * and update the version numbers:
  23.  *
  24.  * unix/configure.in
  25.  * win/makefile.bc
  26.  * win/makefile.vc
  27.  * library/tk.tcl
  28.  *
  29.  * The release level should be  0 for alpha, 1 for beta, and 2 for
  30.  * final/patch.  The release serial value is the number that follows the
  31.  * "a", "b", or "p" in the patch level; for example, if the patch level
  32.  * is 4.3b2, TK_RELEASE_SERIAL is 2.  It restarts at 1 whenever the
  33.  * release level is changed, except for the final release, which should
  34.  * be 0.
  35.  *
  36.  * You may also need to update some of these files when the numbers change
  37.  * for the version of Tcl that this release of Tk is compiled against.
  38.  */
  39.  
  40. #define TK_MAJOR_VERSION   8
  41. #define TK_MINOR_VERSION   0
  42. #define TK_RELEASE_LEVEL   2
  43. #define TK_RELEASE_SERIAL  2
  44.  
  45. #define TK_VERSION "8.0"
  46. #define TK_PATCH_LEVEL "8.0p2"
  47.  
  48. /* 
  49.  * A special definition used to allow this header file to be included 
  50.  * in resource files.
  51.  */
  52.  
  53. #ifndef RESOURCE_INCLUDED
  54.  
  55. /*
  56.  * The following definitions set up the proper options for Macintosh
  57.  * compilers.  We use this method because there is no autoconf equivalent.
  58.  */
  59.  
  60. #ifdef MAC_TCL
  61. #   ifndef REDO_KEYSYM_LOOKUP
  62. #    define REDO_KEYSYM_LOOKUP
  63. #   endif
  64. #endif
  65.  
  66. #ifndef _TCL
  67. #   include <tcl.h>
  68. #endif
  69. #ifndef _XLIB_H
  70. #   ifdef MAC_TCL
  71. #    include <Xlib.h>
  72. #    include <X.h>
  73. #   else
  74. #    include <X11/Xlib.h>
  75. #   endif
  76. #endif
  77. #ifdef __STDC__
  78. #   include <stddef.h>
  79. #endif
  80.  
  81. /*
  82.  * Decide whether or not to use input methods.
  83.  */
  84.  
  85. #ifdef XNQueryInputStyle
  86. #define TK_USE_INPUT_METHODS
  87. #endif
  88.  
  89. /*
  90.  * Dummy types that are used by clients:
  91.  */
  92.  
  93. typedef struct Tk_BindingTable_ *Tk_BindingTable;
  94. typedef struct Tk_Canvas_ *Tk_Canvas;
  95. typedef struct Tk_Cursor_ *Tk_Cursor;
  96. typedef struct Tk_ErrorHandler_ *Tk_ErrorHandler;
  97. typedef struct Tk_Font_ *Tk_Font;
  98. typedef struct Tk_Image__ *Tk_Image;
  99. typedef struct Tk_ImageMaster_ *Tk_ImageMaster;
  100. typedef struct Tk_TextLayout_ *Tk_TextLayout;
  101. typedef struct Tk_Window_ *Tk_Window;
  102. typedef struct Tk_3DBorder_ *Tk_3DBorder;
  103.  
  104. /*
  105.  * Additional types exported to clients.
  106.  */
  107.  
  108. typedef char *Tk_Uid;
  109.  
  110. /*
  111.  * Structure used to specify how to handle argv options.
  112.  */
  113.  
  114. typedef struct {
  115.     char *key;        /* The key string that flags the option in the
  116.              * argv array. */
  117.     int type;        /* Indicates option type;  see below. */
  118.     char *src;        /* Value to be used in setting dst;  usage
  119.              * depends on type. */
  120.     char *dst;        /* Address of value to be modified;  usage
  121.              * depends on type. */
  122.     char *help;        /* Documentation message describing this option. */
  123. } Tk_ArgvInfo;
  124.  
  125. /*
  126.  * Legal values for the type field of a Tk_ArgvInfo: see the user
  127.  * documentation for details.
  128.  */
  129.  
  130. #define TK_ARGV_CONSTANT        15
  131. #define TK_ARGV_INT            16
  132. #define TK_ARGV_STRING            17
  133. #define TK_ARGV_UID            18
  134. #define TK_ARGV_REST            19
  135. #define TK_ARGV_FLOAT            20
  136. #define TK_ARGV_FUNC            21
  137. #define TK_ARGV_GENFUNC            22
  138. #define TK_ARGV_HELP            23
  139. #define TK_ARGV_CONST_OPTION        24
  140. #define TK_ARGV_OPTION_VALUE        25
  141. #define TK_ARGV_OPTION_NAME_VALUE    26
  142. /* CYGNUS LOCAL: Support -version argument.  */
  143. #define TK_ARGV_VERSION            27
  144. #define TK_ARGV_END            28
  145.  
  146. /*
  147.  * Flag bits for passing to Tk_ParseArgv:
  148.  */
  149.  
  150. #define TK_ARGV_NO_DEFAULTS        0x1
  151. #define TK_ARGV_NO_LEFTOVERS        0x2
  152. #define TK_ARGV_NO_ABBREV        0x4
  153. #define TK_ARGV_DONT_SKIP_FIRST_ARG    0x8
  154.  
  155. /*
  156.  * Structure used to describe application-specific configuration
  157.  * options:  indicates procedures to call to parse an option and
  158.  * to return a text string describing an option.
  159.  */
  160.  
  161. typedef int (Tk_OptionParseProc) _ANSI_ARGS_((ClientData clientData,
  162.     Tcl_Interp *interp, Tk_Window tkwin, char *value, char *widgRec,
  163.     int offset));
  164. typedef char *(Tk_OptionPrintProc) _ANSI_ARGS_((ClientData clientData,
  165.     Tk_Window tkwin, char *widgRec, int offset,
  166.     Tcl_FreeProc **freeProcPtr));
  167.  
  168. typedef struct Tk_CustomOption {
  169.     Tk_OptionParseProc *parseProc;    /* Procedure to call to parse an
  170.                      * option and store it in converted
  171.                      * form. */
  172.     Tk_OptionPrintProc *printProc;    /* Procedure to return a printable
  173.                      * string describing an existing
  174.                      * option. */
  175.     ClientData clientData;        /* Arbitrary one-word value used by
  176.                      * option parser:  passed to
  177.                      * parseProc and printProc. */
  178. } Tk_CustomOption;
  179.  
  180. /*
  181.  * Structure used to specify information for Tk_ConfigureWidget.  Each
  182.  * structure gives complete information for one option, including
  183.  * how the option is specified on the command line, where it appears
  184.  * in the option database, etc.
  185.  */
  186.  
  187. typedef struct Tk_ConfigSpec {
  188.     int type;            /* Type of option, such as TK_CONFIG_COLOR;
  189.                  * see definitions below.  Last option in
  190.                  * table must have type TK_CONFIG_END. */
  191.     char *argvName;        /* Switch used to specify option in argv.
  192.                  * NULL means this spec is part of a group. */
  193.     char *dbName;        /* Name for option in option database. */
  194.     char *dbClass;        /* Class for option in database. */
  195.     char *defValue;        /* Default value for option if not
  196.                  * specified in command line or database. */
  197.     int offset;            /* Where in widget record to store value;
  198.                  * use Tk_Offset macro to generate values
  199.                  * for this. */
  200.     int specFlags;        /* Any combination of the values defined
  201.                  * below;  other bits are used internally
  202.                  * by tkConfig.c. */
  203.     Tk_CustomOption *customPtr;    /* If type is TK_CONFIG_CUSTOM then this is
  204.                  * a pointer to info about how to parse and
  205.                  * print the option.  Otherwise it is
  206.                  * irrelevant. */
  207. } Tk_ConfigSpec;
  208.  
  209. /*
  210.  * Type values for Tk_ConfigSpec structures.  See the user
  211.  * documentation for details.
  212.  */
  213.  
  214. #define TK_CONFIG_BOOLEAN    1
  215. #define TK_CONFIG_INT        2
  216. #define TK_CONFIG_DOUBLE    3
  217. #define TK_CONFIG_STRING    4
  218. #define TK_CONFIG_UID        5
  219. #define TK_CONFIG_COLOR        6
  220. #define TK_CONFIG_FONT        7
  221. #define TK_CONFIG_BITMAP    8
  222. #define TK_CONFIG_BORDER    9
  223. #define TK_CONFIG_RELIEF    10
  224. #define TK_CONFIG_CURSOR    11
  225. #define TK_CONFIG_ACTIVE_CURSOR    12
  226. #define TK_CONFIG_JUSTIFY    13
  227. #define TK_CONFIG_ANCHOR    14
  228. #define TK_CONFIG_SYNONYM    15
  229. #define TK_CONFIG_CAP_STYLE    16
  230. #define TK_CONFIG_JOIN_STYLE    17
  231. #define TK_CONFIG_PIXELS    18
  232. #define TK_CONFIG_MM        19
  233. #define TK_CONFIG_WINDOW    20
  234. #define TK_CONFIG_CUSTOM    21
  235. #define TK_CONFIG_END        22
  236.  
  237. /*
  238.  * Macro to use to fill in "offset" fields of Tk_ConfigInfos.
  239.  * Computes number of bytes from beginning of structure to a
  240.  * given field.
  241.  */
  242.  
  243. #ifdef offsetof
  244. #define Tk_Offset(type, field) ((int) offsetof(type, field))
  245. #else
  246. #define Tk_Offset(type, field) ((int) ((char *) &((type *) 0)->field))
  247. #endif
  248.  
  249. /*
  250.  * Possible values for flags argument to Tk_ConfigureWidget:
  251.  */
  252.  
  253. #define TK_CONFIG_ARGV_ONLY    1
  254.  
  255. /*
  256.  * Possible flag values for Tk_ConfigInfo structures.  Any bits at
  257.  * or above TK_CONFIG_USER_BIT may be used by clients for selecting
  258.  * certain entries.  Before changing any values here, coordinate with
  259.  * tkConfig.c (internal-use-only flags are defined there).
  260.  */
  261.  
  262. #define TK_CONFIG_COLOR_ONLY        1
  263. #define TK_CONFIG_MONO_ONLY        2
  264. #define TK_CONFIG_NULL_OK        4
  265. #define TK_CONFIG_DONT_SET_DEFAULT    8
  266. #define TK_CONFIG_OPTION_SPECIFIED    0x10
  267. #define TK_CONFIG_USER_BIT        0x100
  268.  
  269. /*
  270.  * Enumerated type for describing actions to be taken in response
  271.  * to a restrictProc established by Tk_RestrictEvents.
  272.  */
  273.  
  274. typedef enum {
  275.     TK_DEFER_EVENT, TK_PROCESS_EVENT, TK_DISCARD_EVENT
  276. } Tk_RestrictAction;
  277.  
  278. /*
  279.  * Priority levels to pass to Tk_AddOption:
  280.  */
  281.  
  282. #define TK_WIDGET_DEFAULT_PRIO    20
  283. #define TK_STARTUP_FILE_PRIO    40
  284. #define TK_USER_DEFAULT_PRIO    60
  285. #define TK_INTERACTIVE_PRIO    80
  286. #define TK_MAX_PRIO        100
  287.  
  288. /*
  289.  * Relief values returned by Tk_GetRelief:
  290.  */
  291.  
  292. #define TK_RELIEF_RAISED    1
  293. #define TK_RELIEF_FLAT        2
  294. #define TK_RELIEF_SUNKEN    4
  295. #define TK_RELIEF_GROOVE    8
  296. #define TK_RELIEF_RIDGE        16
  297. #define TK_RELIEF_SOLID        32
  298.  
  299. /*
  300.  * "Which" argument values for Tk_3DBorderGC:
  301.  */
  302.  
  303. #define TK_3D_FLAT_GC        1
  304. #define TK_3D_LIGHT_GC        2
  305. #define TK_3D_DARK_GC        3
  306.  
  307. /*
  308.  * Special EnterNotify/LeaveNotify "mode" for use in events
  309.  * generated by tkShare.c.  Pick a high enough value that it's
  310.  * unlikely to conflict with existing values (like NotifyNormal)
  311.  * or any new values defined in the future.
  312.  */
  313.  
  314. #define TK_NOTIFY_SHARE        20
  315.  
  316. /*
  317.  * Enumerated type for describing a point by which to anchor something:
  318.  */
  319.  
  320. typedef enum {
  321.     TK_ANCHOR_N, TK_ANCHOR_NE, TK_ANCHOR_E, TK_ANCHOR_SE,
  322.     TK_ANCHOR_S, TK_ANCHOR_SW, TK_ANCHOR_W, TK_ANCHOR_NW,
  323.     TK_ANCHOR_CENTER
  324. } Tk_Anchor;
  325.  
  326. /*
  327.  * Enumerated type for describing a style of justification:
  328.  */
  329.  
  330. typedef enum {
  331.     TK_JUSTIFY_LEFT, TK_JUSTIFY_RIGHT, TK_JUSTIFY_CENTER
  332. } Tk_Justify;
  333.  
  334. /*
  335.  * The following structure is used by Tk_GetFontMetrics() to return
  336.  * information about the properties of a Tk_Font.  
  337.  */
  338.  
  339. typedef struct Tk_FontMetrics {
  340.     int ascent;            /* The amount in pixels that the tallest
  341.                  * letter sticks up above the baseline, plus
  342.                  * any extra blank space added by the designer
  343.                  * of the font. */
  344.     int descent;        /* The largest amount in pixels that any
  345.                  * letter sticks below the baseline, plus any
  346.                  * extra blank space added by the designer of
  347.                  * the font. */
  348.     int linespace;        /* The sum of the ascent and descent.  How
  349.                  * far apart two lines of text in the same
  350.                  * font should be placed so that none of the
  351.                  * characters in one line overlap any of the
  352.                  * characters in the other line. */
  353. } Tk_FontMetrics;
  354.  
  355. /*
  356.  * Flags passed to Tk_MeasureChars:
  357.  */
  358.  
  359. #define TK_WHOLE_WORDS        1
  360. #define TK_AT_LEAST_ONE        2
  361. #define TK_PARTIAL_OK        4
  362.  
  363. /*
  364.  * Flags passed to Tk_ComputeTextLayout:
  365.  */
  366.  
  367. #define TK_IGNORE_TABS        8
  368. #define TK_IGNORE_NEWLINES    16
  369.  
  370. /*
  371.  * Each geometry manager (the packer, the placer, etc.) is represented
  372.  * by a structure of the following form, which indicates procedures
  373.  * to invoke in the geometry manager to carry out certain functions.
  374.  */
  375.  
  376. typedef void (Tk_GeomRequestProc) _ANSI_ARGS_((ClientData clientData,
  377.     Tk_Window tkwin));
  378. typedef void (Tk_GeomLostSlaveProc) _ANSI_ARGS_((ClientData clientData,
  379.     Tk_Window tkwin));
  380.  
  381. typedef struct Tk_GeomMgr {
  382.     char *name;            /* Name of the geometry manager (command
  383.                  * used to invoke it, or name of widget
  384.                  * class that allows embedded widgets). */
  385.     Tk_GeomRequestProc *requestProc;
  386.                 /* Procedure to invoke when a slave's
  387.                  * requested geometry changes. */
  388.     Tk_GeomLostSlaveProc *lostSlaveProc;
  389.                 /* Procedure to invoke when a slave is
  390.                  * taken away from one geometry manager
  391.                  * by another.  NULL means geometry manager
  392.                  * doesn't care when slaves are lost. */
  393. } Tk_GeomMgr;
  394.  
  395. /*
  396.  * Result values returned by Tk_GetScrollInfo:
  397.  */
  398.  
  399. #define TK_SCROLL_MOVETO    1
  400. #define TK_SCROLL_PAGES        2
  401. #define TK_SCROLL_UNITS        3
  402. #define TK_SCROLL_ERROR        4
  403.  
  404. /*
  405.  *---------------------------------------------------------------------------
  406.  *
  407.  * Extensions to the X event set
  408.  *
  409.  *---------------------------------------------------------------------------
  410.  */
  411. #define VirtualEvent        (LASTEvent)
  412. #define ActivateNotify        (LASTEvent + 1)
  413. #define DeactivateNotify    (LASTEvent + 2)
  414. #define TK_LASTEVENT        (LASTEvent + 3)
  415.  
  416. #define VirtualEventMask    (1L << 30)
  417. #define ActivateMask        (1L << 29)
  418. #define TK_LASTEVENT        (LASTEvent + 3)
  419.  
  420.  
  421. /*
  422.  * A virtual event shares most of its fields with the XKeyEvent and
  423.  * XButtonEvent structures.  99% of the time a virtual event will be
  424.  * an abstraction of a key or button event, so this structure provides
  425.  * the most information to the user.  The only difference is the changing
  426.  * of the detail field for a virtual event so that it holds the name of the
  427.  * virtual event being triggered.
  428.  */
  429.  
  430. typedef struct {
  431.     int type;
  432.     unsigned long serial;   /* # of last request processed by server */
  433.     Bool send_event;        /* True if this came from a SendEvent request */
  434.     Display *display;        /* Display the event was read from */
  435.     Window event;        /* Window on which event was requested. */
  436.     Window root;        /* root window that the event occured on */
  437.     Window subwindow;        /* child window */
  438.     Time time;            /* milliseconds */
  439.     int x, y;            /* pointer x, y coordinates in event window */
  440.     int x_root, y_root;        /* coordinates relative to root */
  441.     unsigned int state;        /* key or button mask */
  442.     Tk_Uid name;        /* Name of virtual event. */
  443.     Bool same_screen;        /* same screen flag */
  444. } XVirtualEvent;
  445.  
  446. typedef struct {
  447.     int type;
  448.     unsigned long serial;   /* # of last request processed by server */
  449.     Bool send_event;        /* True if this came from a SendEvent request */
  450.     Display *display;        /* Display the event was read from */
  451.     Window window;        /* Window in which event occurred. */
  452. } XActivateDeactivateEvent;
  453. typedef XActivateDeactivateEvent XActivateEvent;
  454. typedef XActivateDeactivateEvent XDeactivateEvent;
  455.  
  456. /*
  457.  *--------------------------------------------------------------
  458.  *
  459.  * Macros for querying Tk_Window structures.  See the
  460.  * manual entries for documentation.
  461.  *
  462.  *--------------------------------------------------------------
  463.  */
  464.  
  465. #define Tk_Display(tkwin)        (((Tk_FakeWin *) (tkwin))->display)
  466. #define Tk_ScreenNumber(tkwin)        (((Tk_FakeWin *) (tkwin))->screenNum)
  467. #define Tk_Screen(tkwin)        (ScreenOfDisplay(Tk_Display(tkwin), \
  468.     Tk_ScreenNumber(tkwin)))
  469. #define Tk_Depth(tkwin)            (((Tk_FakeWin *) (tkwin))->depth)
  470. #define Tk_Visual(tkwin)        (((Tk_FakeWin *) (tkwin))->visual)
  471. #define Tk_WindowId(tkwin)        (((Tk_FakeWin *) (tkwin))->window)
  472. #define Tk_PathName(tkwin)         (((Tk_FakeWin *) (tkwin))->pathName)
  473. #define Tk_Name(tkwin)            (((Tk_FakeWin *) (tkwin))->nameUid)
  474. #define Tk_Class(tkwin)         (((Tk_FakeWin *) (tkwin))->classUid)
  475. #define Tk_X(tkwin)            (((Tk_FakeWin *) (tkwin))->changes.x)
  476. #define Tk_Y(tkwin)            (((Tk_FakeWin *) (tkwin))->changes.y)
  477. #define Tk_Width(tkwin)            (((Tk_FakeWin *) (tkwin))->changes.width)
  478. #define Tk_Height(tkwin) \
  479.     (((Tk_FakeWin *) (tkwin))->changes.height)
  480. #define Tk_Changes(tkwin)        (&((Tk_FakeWin *) (tkwin))->changes)
  481. #define Tk_Attributes(tkwin)        (&((Tk_FakeWin *) (tkwin))->atts)
  482. #define Tk_IsEmbedded(tkwin) \
  483.     (((Tk_FakeWin *) (tkwin))->flags & TK_EMBEDDED)
  484. #define Tk_IsContainer(tkwin) \
  485.     (((Tk_FakeWin *) (tkwin))->flags & TK_CONTAINER)
  486. #define Tk_IsMapped(tkwin) \
  487.     (((Tk_FakeWin *) (tkwin))->flags & TK_MAPPED)
  488. #define Tk_IsTopLevel(tkwin) \
  489.     (((Tk_FakeWin *) (tkwin))->flags & TK_TOP_LEVEL)
  490. #define Tk_ReqWidth(tkwin)        (((Tk_FakeWin *) (tkwin))->reqWidth)
  491. #define Tk_ReqHeight(tkwin)        (((Tk_FakeWin *) (tkwin))->reqHeight)
  492. #define Tk_InternalBorderWidth(tkwin) \
  493.     (((Tk_FakeWin *) (tkwin))->internalBorderWidth)
  494. #define Tk_Parent(tkwin)        (((Tk_FakeWin *) (tkwin))->parentPtr)
  495. #define Tk_Colormap(tkwin)        (((Tk_FakeWin *) (tkwin))->atts.colormap)
  496.  
  497. /*
  498.  * The structure below is needed by the macros above so that they can
  499.  * access the fields of a Tk_Window.  The fields not needed by the macros
  500.  * are declared as "dummyX".  The structure has its own type in order to
  501.  * prevent applications from accessing Tk_Window fields except using
  502.  * official macros.  WARNING!! The structure definition must be kept
  503.  * consistent with the TkWindow structure in tkInt.h.  If you change one,
  504.  * then change the other.  See the declaration in tkInt.h for
  505.  * documentation on what the fields are used for internally.
  506.  */
  507.  
  508. typedef struct Tk_FakeWin {
  509.     Display *display;
  510.     char *dummy1;
  511.     int screenNum;
  512.     Visual *visual;
  513.     int depth;
  514.     Window window;
  515.     char *dummy2;
  516.     char *dummy3;
  517.     Tk_Window parentPtr;
  518.     char *dummy4;
  519.     char *dummy5;
  520.     char *pathName;
  521.     Tk_Uid nameUid;
  522.     Tk_Uid classUid;
  523.     XWindowChanges changes;
  524.     unsigned int dummy6;
  525.     XSetWindowAttributes atts;
  526.     unsigned long dummy7;
  527.     unsigned int flags;
  528.     char *dummy8;
  529. #ifdef TK_USE_INPUT_METHODS
  530.     XIC dummy9;
  531. #endif /* TK_USE_INPUT_METHODS */
  532.     ClientData *dummy10;
  533.     int dummy11;
  534.     int dummy12;
  535.     char *dummy13;
  536.     char *dummy14;
  537.     ClientData dummy15;
  538.     int reqWidth, reqHeight;
  539.     int internalBorderWidth;
  540.     char *dummy16;
  541.     char *dummy17;
  542.     ClientData dummy18;
  543.     char *dummy19;
  544. } Tk_FakeWin;
  545.  
  546. /*
  547.  * Flag values for TkWindow (and Tk_FakeWin) structures are:
  548.  *
  549.  * TK_MAPPED:            1 means window is currently mapped,
  550.  *                0 means unmapped.
  551.  * TK_TOP_LEVEL:        1 means this is a top-level window (it
  552.  *                was or will be created as a child of
  553.  *                a root window).
  554.  * TK_ALREADY_DEAD:        1 means the window is in the process of
  555.  *                being destroyed already.
  556.  * TK_NEED_CONFIG_NOTIFY:    1 means that the window has been reconfigured
  557.  *                before it was made to exist.  At the time of
  558.  *                making it exist a ConfigureNotify event needs
  559.  *                to be generated.
  560.  * TK_GRAB_FLAG:        Used to manage grabs.  See tkGrab.c for
  561.  *                details.
  562.  * TK_CHECKED_IC:        1 means we've already tried to get an input
  563.  *                context for this window;  if the ic field
  564.  *                is NULL it means that there isn't a context
  565.  *                for the field.
  566.  * TK_DONT_DESTROY_WINDOW:    1 means that Tk_DestroyWindow should not
  567.  *                invoke XDestroyWindow to destroy this widget's
  568.  *                X window.  The flag is set when the window
  569.  *                has already been destroyed elsewhere (e.g.
  570.  *                by another application) or when it will be
  571.  *                destroyed later (e.g. by destroying its
  572.  *                parent).
  573.  * TK_WM_COLORMAP_WINDOW:    1 means that this window has at some time
  574.  *                appeared in the WM_COLORMAP_WINDOWS property
  575.  *                for its toplevel, so we have to remove it
  576.  *                from that property if the window is
  577.  *                deleted and the toplevel isn't.
  578.  * TK_EMBEDDED:            1 means that this window (which must be a
  579.  *                toplevel) is not a free-standing window but
  580.  *                rather is embedded in some other application.
  581.  * TK_CONTAINER:        1 means that this window is a container, and
  582.  *                that some other application (either in
  583.  *                this process or elsewhere) may be
  584.  *                embedding itself inside the window.
  585.  * TK_BOTH_HALVES:        1 means that this window is used for
  586.  *                application embedding (either as
  587.  *                container or embedded application), and
  588.  *                both the containing and embedded halves
  589.  *                are associated with windows in this
  590.  *                particular process.
  591.  * TK_DEFER_MODAL:        1 means that this window has deferred a modal
  592.  *                loop until all of the bindings for the current
  593.  *                event have been invoked.
  594.  * TK_WRAPPER:            1 means that this window is the extra
  595.  *                wrapper window created around a toplevel
  596.  *                to hold the menubar under Unix.  See
  597.  *                tkUnixWm.c for more information.
  598.  * TK_REPARENTED:        1 means that this window has been reparented
  599.  *                so that as far as the window system is
  600.  *                concerned it isn't a child of its Tk
  601.  *                parent.  Initially this is used only for
  602.  *                special Unix menubar windows.
  603.  */
  604.  
  605.  
  606. #define TK_MAPPED        1
  607. #define TK_TOP_LEVEL        2
  608. #define TK_ALREADY_DEAD        4
  609. #define TK_NEED_CONFIG_NOTIFY    8
  610. #define TK_GRAB_FLAG        0x10
  611. #define TK_CHECKED_IC        0x20
  612. #define TK_DONT_DESTROY_WINDOW    0x40
  613. #define TK_WM_COLORMAP_WINDOW    0x80
  614. #define TK_EMBEDDED        0x100
  615. #define TK_CONTAINER        0x200
  616. #define TK_BOTH_HALVES        0x400
  617. #define TK_DEFER_MODAL        0x800
  618. #define TK_WRAPPER        0x1000
  619. #define TK_REPARENTED        0x2000
  620.  
  621. /*
  622.  *--------------------------------------------------------------
  623.  *
  624.  * Procedure prototypes and structures used for defining new canvas
  625.  * items:
  626.  *
  627.  *--------------------------------------------------------------
  628.  */
  629.  
  630. /*
  631.  * For each item in a canvas widget there exists one record with
  632.  * the following structure.  Each actual item is represented by
  633.  * a record with the following stuff at its beginning, plus additional
  634.  * type-specific stuff after that.
  635.  */
  636.  
  637. #define TK_TAG_SPACE 3
  638.  
  639. typedef struct Tk_Item  {
  640.     int id;                /* Unique identifier for this item
  641.                      * (also serves as first tag for
  642.                      * item). */
  643.     struct Tk_Item *nextPtr;        /* Next in display list of all
  644.                      * items in this canvas.  Later items
  645.                      * in list are drawn on top of earlier
  646.                      * ones. */
  647.     Tk_Uid staticTagSpace[TK_TAG_SPACE];/* Built-in space for limited # of
  648.                      * tags. */
  649.     Tk_Uid *tagPtr;            /* Pointer to array of tags.  Usually
  650.                      * points to staticTagSpace, but
  651.                      * may point to malloc-ed space if
  652.                      * there are lots of tags. */
  653.     int tagSpace;            /* Total amount of tag space available
  654.                      * at tagPtr. */
  655.     int numTags;            /* Number of tag slots actually used
  656.                      * at *tagPtr. */
  657.     struct Tk_ItemType *typePtr;    /* Table of procedures that implement
  658.                      * this type of item. */
  659.     int x1, y1, x2, y2;            /* Bounding box for item, in integer
  660.                      * canvas units. Set by item-specific
  661.                      * code and guaranteed to contain every
  662.                      * pixel drawn in item.  Item area
  663.                      * includes x1 and y1 but not x2
  664.                      * and y2. */
  665.  
  666.     /*
  667.      *------------------------------------------------------------------
  668.      * Starting here is additional type-specific stuff;  see the
  669.      * declarations for individual types to see what is part of
  670.      * each type.  The actual space below is determined by the
  671.      * "itemInfoSize" of the type's Tk_ItemType record.
  672.      *------------------------------------------------------------------
  673.      */
  674. } Tk_Item;
  675.  
  676. /*
  677.  * Records of the following type are used to describe a type of
  678.  * item (e.g.  lines, circles, etc.) that can form part of a
  679.  * canvas widget.
  680.  */
  681.  
  682. typedef int    Tk_ItemCreateProc _ANSI_ARGS_((Tcl_Interp *interp,
  683.             Tk_Canvas canvas, Tk_Item *itemPtr, int argc,
  684.             char **argv));
  685. typedef int    Tk_ItemConfigureProc _ANSI_ARGS_((Tcl_Interp *interp,
  686.             Tk_Canvas canvas, Tk_Item *itemPtr, int argc,
  687.             char **argv, int flags));
  688. typedef int    Tk_ItemCoordProc _ANSI_ARGS_((Tcl_Interp *interp,
  689.             Tk_Canvas canvas, Tk_Item *itemPtr, int argc,
  690.             char **argv));
  691. typedef void    Tk_ItemDeleteProc _ANSI_ARGS_((Tk_Canvas canvas,
  692.             Tk_Item *itemPtr, Display *display));
  693. typedef void    Tk_ItemDisplayProc _ANSI_ARGS_((Tk_Canvas canvas,
  694.             Tk_Item *itemPtr, Display *display, Drawable dst,
  695.             int x, int y, int width, int height));
  696. typedef double    Tk_ItemPointProc _ANSI_ARGS_((Tk_Canvas canvas,
  697.             Tk_Item *itemPtr, double *pointPtr));
  698. typedef int    Tk_ItemAreaProc _ANSI_ARGS_((Tk_Canvas canvas,
  699.             Tk_Item *itemPtr, double *rectPtr));
  700. typedef int    Tk_ItemPostscriptProc _ANSI_ARGS_((Tcl_Interp *interp,
  701.             Tk_Canvas canvas, Tk_Item *itemPtr, int prepass));
  702. typedef void    Tk_ItemScaleProc _ANSI_ARGS_((Tk_Canvas canvas,
  703.             Tk_Item *itemPtr, double originX, double originY,
  704.             double scaleX, double scaleY));
  705. typedef void    Tk_ItemTranslateProc _ANSI_ARGS_((Tk_Canvas canvas,
  706.             Tk_Item *itemPtr, double deltaX, double deltaY));
  707. typedef int    Tk_ItemIndexProc _ANSI_ARGS_((Tcl_Interp *interp,
  708.             Tk_Canvas canvas, Tk_Item *itemPtr, char *indexString,
  709.             int *indexPtr));
  710. typedef void    Tk_ItemCursorProc _ANSI_ARGS_((Tk_Canvas canvas,
  711.             Tk_Item *itemPtr, int index));
  712. typedef int    Tk_ItemSelectionProc _ANSI_ARGS_((Tk_Canvas canvas,
  713.             Tk_Item *itemPtr, int offset, char *buffer,
  714.             int maxBytes));
  715. typedef void    Tk_ItemInsertProc _ANSI_ARGS_((Tk_Canvas canvas,
  716.             Tk_Item *itemPtr, int beforeThis, char *string));
  717. typedef void    Tk_ItemDCharsProc _ANSI_ARGS_((Tk_Canvas canvas,
  718.             Tk_Item *itemPtr, int first, int last));
  719.  
  720. typedef struct Tk_ItemType {
  721.     char *name;                /* The name of this type of item, such
  722.                      * as "line". */
  723.     int itemSize;            /* Total amount of space needed for
  724.                      * item's record. */
  725.     Tk_ItemCreateProc *createProc;    /* Procedure to create a new item of
  726.                      * this type. */
  727.     Tk_ConfigSpec *configSpecs;        /* Pointer to array of configuration
  728.                      * specs for this type.  Used for
  729.                      * returning configuration info. */
  730.     Tk_ItemConfigureProc *configProc;    /* Procedure to call to change
  731.                      * configuration options. */
  732.     Tk_ItemCoordProc *coordProc;    /* Procedure to call to get and set
  733.                      * the item's coordinates. */
  734.     Tk_ItemDeleteProc *deleteProc;    /* Procedure to delete existing item of
  735.                      * this type. */
  736.     Tk_ItemDisplayProc *displayProc;    /* Procedure to display items of
  737.                      * this type. */
  738.     int alwaysRedraw;            /* Non-zero means displayProc should
  739.                      * be called even when the item has
  740.                      * been moved off-screen. */
  741.     Tk_ItemPointProc *pointProc;    /* Computes distance from item to
  742.                      * a given point. */
  743.     Tk_ItemAreaProc *areaProc;        /* Computes whether item is inside,
  744.                      * outside, or overlapping an area. */
  745.     Tk_ItemPostscriptProc *postscriptProc;
  746.                     /* Procedure to write a Postscript
  747.                      * description for items of this
  748.                      * type. */
  749.     Tk_ItemScaleProc *scaleProc;    /* Procedure to rescale items of
  750.                      * this type. */
  751.     Tk_ItemTranslateProc *translateProc;/* Procedure to translate items of
  752.                      * this type. */
  753.     Tk_ItemIndexProc *indexProc;    /* Procedure to determine index of
  754.                      * indicated character.  NULL if
  755.                      * item doesn't support indexing. */
  756.     Tk_ItemCursorProc *icursorProc;    /* Procedure to set insert cursor pos.
  757.                      * to just before a given position. */
  758.     Tk_ItemSelectionProc *selectionProc;/* Procedure to return selection (in
  759.                      * STRING format) when it is in this
  760.                      * item. */
  761.     Tk_ItemInsertProc *insertProc;    /* Procedure to insert something into
  762.                      * an item. */
  763.     Tk_ItemDCharsProc *dCharsProc;    /* Procedure to delete characters
  764.                      * from an item. */
  765.     struct Tk_ItemType *nextPtr;    /* Used to link types together into
  766.                      * a list. */
  767. } Tk_ItemType;
  768.  
  769. /*
  770.  * The following structure provides information about the selection and
  771.  * the insertion cursor.  It is needed by only a few items, such as
  772.  * those that display text.  It is shared by the generic canvas code
  773.  * and the item-specific code, but most of the fields should be written
  774.  * only by the canvas generic code.
  775.  */
  776.  
  777. typedef struct Tk_CanvasTextInfo {
  778.     Tk_3DBorder selBorder;    /* Border and background for selected
  779.                  * characters.  Read-only to items.*/
  780.     int selBorderWidth;        /* Width of border around selection. 
  781.                  * Read-only to items. */
  782.     XColor *selFgColorPtr;    /* Foreground color for selected text.
  783.                  * Read-only to items. */
  784.     Tk_Item *selItemPtr;    /* Pointer to selected item.  NULL means
  785.                  * selection isn't in this canvas.
  786.                  * Writable by items. */
  787.     int selectFirst;        /* Index of first selected character. 
  788.                  * Writable by items. */
  789.     int selectLast;        /* Index of last selected character. 
  790.                  * Writable by items. */
  791.     Tk_Item *anchorItemPtr;    /* Item corresponding to "selectAnchor":
  792.                  * not necessarily selItemPtr.   Read-only
  793.                  * to items. */
  794.     int selectAnchor;        /* Fixed end of selection (i.e. "select to"
  795.                  * operation will use this as one end of the
  796.                  * selection).  Writable by items. */
  797.     Tk_3DBorder insertBorder;    /* Used to draw vertical bar for insertion
  798.                  * cursor.  Read-only to items. */
  799.     int insertWidth;        /* Total width of insertion cursor.  Read-only
  800.                  * to items. */
  801.     int insertBorderWidth;    /* Width of 3-D border around insert cursor.
  802.                  * Read-only to items. */
  803.     Tk_Item *focusItemPtr;    /* Item that currently has the input focus,
  804.                  * or NULL if no such item.  Read-only to
  805.                  * items.  */
  806.     int gotFocus;        /* Non-zero means that the canvas widget has
  807.                  * the input focus.  Read-only to items.*/
  808.     int cursorOn;        /* Non-zero means that an insertion cursor
  809.                  * should be displayed in focusItemPtr.
  810.                  * Read-only to items.*/
  811. } Tk_CanvasTextInfo;
  812.  
  813. /*
  814.  *--------------------------------------------------------------
  815.  *
  816.  * Procedure prototypes and structures used for managing images:
  817.  *
  818.  *--------------------------------------------------------------
  819.  */
  820.  
  821. typedef struct Tk_ImageType Tk_ImageType;
  822. typedef int (Tk_ImageCreateProc) _ANSI_ARGS_((Tcl_Interp *interp,
  823.     char *name, int objc, Tcl_Obj *CONST objv[], Tk_ImageType *typePtr,
  824.     Tk_ImageMaster master, ClientData *masterDataPtr));
  825. typedef ClientData (Tk_ImageGetProc) _ANSI_ARGS_((Tk_Window tkwin,
  826.     ClientData masterData));
  827. typedef void (Tk_ImageDisplayProc) _ANSI_ARGS_((ClientData instanceData,
  828.     Display *display, Drawable drawable, int imageX, int imageY,
  829.     int width, int height, int drawableX, int drawableY));
  830. typedef void (Tk_ImageFreeProc) _ANSI_ARGS_((ClientData instanceData,
  831.     Display *display));
  832. typedef void (Tk_ImageDeleteProc) _ANSI_ARGS_((ClientData masterData));
  833. typedef void (Tk_ImageChangedProc) _ANSI_ARGS_((ClientData clientData,
  834.     int x, int y, int width, int height, int imageWidth,
  835.     int imageHeight));
  836.  
  837. /*
  838.  * The following structure represents a particular type of image
  839.  * (bitmap, xpm image, etc.).  It provides information common to
  840.  * all images of that type, such as the type name and a collection
  841.  * of procedures in the image manager that respond to various
  842.  * events.  Each image manager is represented by one of these
  843.  * structures.
  844.  */
  845.  
  846. struct Tk_ImageType {
  847.     char *name;            /* Name of image type. */
  848.     Tk_ImageCreateProc *createProc;
  849.                 /* Procedure to call to create a new image
  850.                  * of this type. */
  851.     Tk_ImageGetProc *getProc;    /* Procedure to call the first time
  852.                  * Tk_GetImage is called in a new way
  853.                  * (new visual or screen). */
  854.     Tk_ImageDisplayProc *displayProc;
  855.                 /* Call to draw image, in response to
  856.                  * Tk_RedrawImage calls. */
  857.     Tk_ImageFreeProc *freeProc;    /* Procedure to call whenever Tk_FreeImage
  858.                  * is called to release an instance of an
  859.                  * image. */
  860.     Tk_ImageDeleteProc *deleteProc;
  861.                 /* Procedure to call to delete image.  It
  862.                  * will not be called until after freeProc
  863.                  * has been called for each instance of the
  864.                  * image. */
  865.     struct Tk_ImageType *nextPtr;
  866.                 /* Next in list of all image types currently
  867.                  * known.  Filled in by Tk, not by image
  868.                  * manager. */
  869. };
  870.  
  871. /*
  872.  *--------------------------------------------------------------
  873.  *
  874.  * Additional definitions used to manage images of type "photo".
  875.  *
  876.  *--------------------------------------------------------------
  877.  */
  878.  
  879. /*
  880.  * The following type is used to identify a particular photo image
  881.  * to be manipulated:
  882.  */
  883.  
  884. typedef void *Tk_PhotoHandle;
  885.  
  886. /*
  887.  * The following structure describes a block of pixels in memory:
  888.  */
  889.  
  890. typedef struct Tk_PhotoImageBlock {
  891.     unsigned char *pixelPtr;    /* Pointer to the first pixel. */
  892.     int        width;        /* Width of block, in pixels. */
  893.     int        height;        /* Height of block, in pixels. */
  894.     int        pitch;        /* Address difference between corresponding
  895.                  * pixels in successive lines. */
  896.     int        pixelSize;    /* Address difference between successive
  897.                  * pixels in the same line. */
  898.     int        offset[3];    /* Address differences between the red, green
  899.                  * and blue components of the pixel and the
  900.                  * pixel as a whole. */
  901. } Tk_PhotoImageBlock;
  902.  
  903. /*
  904.  * Procedure prototypes and structures used in reading and
  905.  * writing photo images:
  906.  */
  907.  
  908. typedef struct Tk_PhotoImageFormat Tk_PhotoImageFormat;
  909. typedef int (Tk_ImageFileMatchProc) _ANSI_ARGS_((Tcl_Channel chan,
  910.     char *fileName, char *formatString, int *widthPtr, int *heightPtr));
  911. typedef int (Tk_ImageStringMatchProc) _ANSI_ARGS_((Tcl_Obj *dataObj,
  912.     char *formatString, int *widthPtr, int *heightPtr));
  913. typedef int (Tk_ImageFileReadProc) _ANSI_ARGS_((Tcl_Interp *interp,
  914.     Tcl_Channel chan, char *fileName, char *formatString,
  915.     Tk_PhotoHandle imageHandle, int destX, int destY,
  916.     int width, int height, int srcX, int srcY));
  917. typedef int (Tk_ImageStringReadProc) _ANSI_ARGS_((Tcl_Interp *interp,
  918.     Tcl_Obj *dataObj, char *formatString, Tk_PhotoHandle imageHandle,
  919.     int destX, int destY, int width, int height, int srcX, int srcY));
  920. typedef int (Tk_ImageFileWriteProc) _ANSI_ARGS_((Tcl_Interp *interp,
  921.     char *fileName, char *formatString, Tk_PhotoImageBlock *blockPtr));
  922. typedef int (Tk_ImageStringWriteProc) _ANSI_ARGS_((Tcl_Interp *interp,
  923.     Tcl_DString *dataPtr, char *formatString,
  924.     Tk_PhotoImageBlock *blockPtr));
  925.  
  926. /*
  927.  * The following structure represents a particular file format for
  928.  * storing images (e.g., PPM, GIF, JPEG, etc.).  It provides information
  929.  * to allow image files of that format to be recognized and read into
  930.  * a photo image.
  931.  */
  932.  
  933. struct Tk_PhotoImageFormat {
  934.     char *name;            /* Name of image file format */
  935.     Tk_ImageFileMatchProc *fileMatchProc;
  936.                 /* Procedure to call to determine whether
  937.                  * an image file matches this format. */
  938.     Tk_ImageStringMatchProc *stringMatchProc;
  939.                 /* Procedure to call to determine whether
  940.                  * the data in a string matches this format. */
  941.     Tk_ImageFileReadProc *fileReadProc;
  942.                 /* Procedure to call to read data from
  943.                  * an image file into a photo image. */
  944.     Tk_ImageStringReadProc *stringReadProc;
  945.                 /* Procedure to call to read data from
  946.                  * a string into a photo image. */
  947.     Tk_ImageFileWriteProc *fileWriteProc;
  948.                 /* Procedure to call to write data from
  949.                  * a photo image to a file. */
  950.     Tk_ImageStringWriteProc *stringWriteProc;
  951.                 /* Procedure to call to obtain a string
  952.                  * representation of the data in a photo
  953.                  * image.*/
  954.     struct Tk_PhotoImageFormat *nextPtr;
  955.                 /* Next in list of all photo image formats
  956.                  * currently known.  Filled in by Tk, not
  957.                  * by image format handler. */
  958. };
  959.  
  960. /*
  961.  *--------------------------------------------------------------
  962.  *
  963.  * The definitions below provide backward compatibility for
  964.  * functions and types related to event handling that used to
  965.  * be in Tk but have moved to Tcl.
  966.  *
  967.  *--------------------------------------------------------------
  968.  */
  969.  
  970. #define TK_READABLE        TCL_READABLE
  971. #define TK_WRITABLE        TCL_WRITABLE
  972. #define TK_EXCEPTION        TCL_EXCEPTION
  973.  
  974. #define TK_DONT_WAIT        TCL_DONT_WAIT
  975. #define TK_X_EVENTS        TCL_WINDOW_EVENTS
  976. #define TK_WINDOW_EVENTS    TCL_WINDOW_EVENTS
  977. #define TK_FILE_EVENTS        TCL_FILE_EVENTS
  978. #define TK_TIMER_EVENTS        TCL_TIMER_EVENTS
  979. #define TK_IDLE_EVENTS        TCL_IDLE_EVENTS
  980. #define TK_ALL_EVENTS        TCL_ALL_EVENTS
  981.  
  982. #define Tk_IdleProc        Tcl_IdleProc
  983. #define Tk_FileProc        Tcl_FileProc
  984. #define Tk_TimerProc        Tcl_TimerProc
  985. #define Tk_TimerToken        Tcl_TimerToken
  986.  
  987. #define Tk_BackgroundError    Tcl_BackgroundError
  988. #define Tk_CancelIdleCall    Tcl_CancelIdleCall
  989. #define Tk_CreateFileHandler    Tcl_CreateFileHandler
  990. #define Tk_CreateTimerHandler    Tcl_CreateTimerHandler
  991. #define Tk_DeleteFileHandler    Tcl_DeleteFileHandler
  992. #define Tk_DeleteTimerHandler    Tcl_DeleteTimerHandler
  993. #define Tk_DoOneEvent        Tcl_DoOneEvent
  994. #define Tk_DoWhenIdle        Tcl_DoWhenIdle
  995. #define Tk_Sleep        Tcl_Sleep
  996.  
  997. /* Additional stuff that has moved to Tcl: */
  998.  
  999. #define Tk_AfterCmd        Tcl_AfterCmd
  1000. #define Tk_EventuallyFree    Tcl_EventuallyFree
  1001. #define Tk_FreeProc        Tcl_FreeProc
  1002. #define Tk_Preserve        Tcl_Preserve
  1003. #define Tk_Release        Tcl_Release
  1004.  
  1005. /*
  1006.  *--------------------------------------------------------------
  1007.  *
  1008.  * Additional procedure types defined by Tk.
  1009.  *
  1010.  *--------------------------------------------------------------
  1011.  */
  1012.  
  1013. typedef int (Tk_ErrorProc) _ANSI_ARGS_((ClientData clientData,
  1014.     XErrorEvent *errEventPtr));
  1015. typedef void (Tk_EventProc) _ANSI_ARGS_((ClientData clientData,
  1016.     XEvent *eventPtr));
  1017. typedef int (Tk_GenericProc) _ANSI_ARGS_((ClientData clientData,
  1018.     XEvent *eventPtr));
  1019. typedef int (Tk_GetSelProc) _ANSI_ARGS_((ClientData clientData,
  1020.     Tcl_Interp *interp, char *portion));
  1021. typedef void (Tk_LostSelProc) _ANSI_ARGS_((ClientData clientData));
  1022. typedef Tk_RestrictAction (Tk_RestrictProc) _ANSI_ARGS_((
  1023.     ClientData clientData, XEvent *eventPtr));
  1024. typedef int (Tk_SelectionProc) _ANSI_ARGS_((ClientData clientData,
  1025.     int offset, char *buffer, int maxBytes));
  1026.  
  1027. /*
  1028.  *--------------------------------------------------------------
  1029.  *
  1030.  * Exported procedures and variables.
  1031.  *
  1032.  *--------------------------------------------------------------
  1033.  */
  1034.  
  1035. EXTERN XColor *        Tk_3DBorderColor _ANSI_ARGS_((Tk_3DBorder border));
  1036. EXTERN GC        Tk_3DBorderGC _ANSI_ARGS_((Tk_Window tkwin,
  1037.                 Tk_3DBorder border, int which));
  1038. EXTERN void        Tk_3DHorizontalBevel _ANSI_ARGS_((Tk_Window tkwin,
  1039.                 Drawable drawable, Tk_3DBorder border, int x,
  1040.                 int y, int width, int height, int leftIn,
  1041.                 int rightIn, int topBevel, int relief));
  1042. EXTERN void        Tk_3DVerticalBevel _ANSI_ARGS_((Tk_Window tkwin,
  1043.                 Drawable drawable, Tk_3DBorder border, int x,
  1044.                 int y, int width, int height, int leftBevel,
  1045.                 int relief));
  1046. EXTERN void        Tk_AddOption _ANSI_ARGS_((Tk_Window tkwin, char *name,
  1047.                 char *value, int priority));
  1048. EXTERN void        Tk_BindEvent _ANSI_ARGS_((Tk_BindingTable bindingTable,
  1049.                 XEvent *eventPtr, Tk_Window tkwin, int numObjects,
  1050.                 ClientData *objectPtr));
  1051. EXTERN void        Tk_CanvasDrawableCoords _ANSI_ARGS_((Tk_Canvas canvas,
  1052.                 double x, double y, short *drawableXPtr,
  1053.                 short *drawableYPtr));
  1054. EXTERN void        Tk_CanvasEventuallyRedraw _ANSI_ARGS_((
  1055.                 Tk_Canvas canvas, int x1, int y1, int x2,
  1056.                 int y2));
  1057. EXTERN int        Tk_CanvasGetCoord _ANSI_ARGS_((Tcl_Interp *interp,
  1058.                 Tk_Canvas canvas, char *string,
  1059.                 double *doublePtr));
  1060. EXTERN Tk_CanvasTextInfo *Tk_CanvasGetTextInfo _ANSI_ARGS_((Tk_Canvas canvas));
  1061. EXTERN int        Tk_CanvasPsBitmap _ANSI_ARGS_((Tcl_Interp *interp,
  1062.                 Tk_Canvas canvas, Pixmap bitmap, int x, int y,
  1063.                 int width, int height));
  1064. EXTERN int        Tk_CanvasPsColor _ANSI_ARGS_((Tcl_Interp *interp,
  1065.                 Tk_Canvas canvas, XColor *colorPtr));
  1066. EXTERN int        Tk_CanvasPsFont _ANSI_ARGS_((Tcl_Interp *interp,
  1067.                 Tk_Canvas canvas, Tk_Font font));
  1068. EXTERN void        Tk_CanvasPsPath _ANSI_ARGS_((Tcl_Interp *interp,
  1069.                 Tk_Canvas canvas, double *coordPtr, int numPoints));
  1070. EXTERN int        Tk_CanvasPsStipple _ANSI_ARGS_((Tcl_Interp *interp,
  1071.                 Tk_Canvas canvas, Pixmap bitmap));
  1072. EXTERN double        Tk_CanvasPsY _ANSI_ARGS_((Tk_Canvas canvas, double y));
  1073. EXTERN void        Tk_CanvasSetStippleOrigin _ANSI_ARGS_((
  1074.                 Tk_Canvas canvas, GC gc));
  1075. EXTERN int        Tk_CanvasTagsParseProc _ANSI_ARGS_((
  1076.                 ClientData clientData, Tcl_Interp *interp,
  1077.                 Tk_Window tkwin, char *value, char *widgRec,
  1078.                 int offset));
  1079. EXTERN char *        Tk_CanvasTagsPrintProc _ANSI_ARGS_((
  1080.                 ClientData clientData, Tk_Window tkwin,
  1081.                 char *widgRec, int offset,
  1082.                 Tcl_FreeProc **freeProcPtr));
  1083. EXTERN Tk_Window    Tk_CanvasTkwin _ANSI_ARGS_((Tk_Canvas canvas));
  1084. EXTERN void        Tk_CanvasWindowCoords _ANSI_ARGS_((Tk_Canvas canvas,
  1085.                 double x, double y, short *screenXPtr,
  1086.                 short *screenYPtr));
  1087. EXTERN void        Tk_ChangeWindowAttributes _ANSI_ARGS_((Tk_Window tkwin,
  1088.                 unsigned long valueMask,
  1089.                 XSetWindowAttributes *attsPtr));
  1090. EXTERN int        Tk_CharBbox _ANSI_ARGS_((Tk_TextLayout layout,
  1091.                 int index, int *xPtr, int *yPtr, int *widthPtr,
  1092.                 int *heightPtr));
  1093. EXTERN void        Tk_ClearSelection _ANSI_ARGS_((Tk_Window tkwin,
  1094.                 Atom selection));
  1095. EXTERN int        Tk_ClipboardAppend _ANSI_ARGS_((Tcl_Interp *interp,
  1096.                 Tk_Window tkwin, Atom target, Atom format,
  1097.                 char* buffer));
  1098. EXTERN int        Tk_ClipboardClear _ANSI_ARGS_((Tcl_Interp *interp,
  1099.                 Tk_Window tkwin));
  1100. EXTERN int        Tk_ConfigureInfo _ANSI_ARGS_((Tcl_Interp *interp,
  1101.                 Tk_Window tkwin, Tk_ConfigSpec *specs,
  1102.                 char *widgRec, char *argvName, int flags));
  1103. EXTERN int        Tk_ConfigureValue _ANSI_ARGS_((Tcl_Interp *interp,
  1104.                 Tk_Window tkwin, Tk_ConfigSpec *specs,
  1105.                 char *widgRec, char *argvName, int flags));
  1106. EXTERN int        Tk_ConfigureWidget _ANSI_ARGS_((Tcl_Interp *interp,
  1107.                 Tk_Window tkwin, Tk_ConfigSpec *specs,
  1108.                 int argc, char **argv, char *widgRec,
  1109.                 int flags));
  1110. EXTERN void        Tk_ConfigureWindow _ANSI_ARGS_((Tk_Window tkwin,
  1111.                 unsigned int valueMask, XWindowChanges *valuePtr));
  1112. EXTERN Tk_TextLayout    Tk_ComputeTextLayout _ANSI_ARGS_((Tk_Font font,
  1113.                 CONST char *string, int numChars, int wrapLength,
  1114.                 Tk_Justify justify, int flags, int *widthPtr,
  1115.                 int *heightPtr));
  1116. EXTERN Tk_Window    Tk_CoordsToWindow _ANSI_ARGS_((int rootX, int rootY,
  1117.                 Tk_Window tkwin));
  1118. EXTERN unsigned long    Tk_CreateBinding _ANSI_ARGS_((Tcl_Interp *interp,
  1119.                 Tk_BindingTable bindingTable, ClientData object,
  1120.                 char *eventString, char *command, int append));
  1121. EXTERN Tk_BindingTable    Tk_CreateBindingTable _ANSI_ARGS_((Tcl_Interp *interp));
  1122. EXTERN Tk_ErrorHandler    Tk_CreateErrorHandler _ANSI_ARGS_((Display *display,
  1123.                 int errNum, int request, int minorCode,
  1124.                 Tk_ErrorProc *errorProc, ClientData clientData));
  1125. EXTERN void        Tk_CreateEventHandler _ANSI_ARGS_((Tk_Window token,
  1126.                 unsigned long mask, Tk_EventProc *proc,
  1127.                 ClientData clientData));
  1128. EXTERN void        Tk_CreateGenericHandler _ANSI_ARGS_((
  1129.                 Tk_GenericProc *proc, ClientData clientData));
  1130. EXTERN void        Tk_CreateImageType _ANSI_ARGS_((
  1131.                 Tk_ImageType *typePtr));
  1132. EXTERN void        Tk_CreateItemType _ANSI_ARGS_((Tk_ItemType *typePtr));
  1133. EXTERN void        Tk_CreatePhotoImageFormat _ANSI_ARGS_((
  1134.                 Tk_PhotoImageFormat *formatPtr));
  1135. EXTERN void        Tk_CreateSelHandler _ANSI_ARGS_((Tk_Window tkwin,
  1136.                 Atom selection, Atom target,
  1137.                 Tk_SelectionProc *proc, ClientData clientData,
  1138.                 Atom format));
  1139. EXTERN Tk_Window    Tk_CreateWindow _ANSI_ARGS_((Tcl_Interp *interp,
  1140.                 Tk_Window parent, char *name, char *screenName));
  1141. EXTERN Tk_Window    Tk_CreateWindowFromPath _ANSI_ARGS_((
  1142.                 Tcl_Interp *interp, Tk_Window tkwin,
  1143.                 char *pathName, char *screenName));
  1144. EXTERN int        Tk_DefineBitmap _ANSI_ARGS_((Tcl_Interp *interp,
  1145.                 Tk_Uid name, char *source, int width,
  1146.                 int height));
  1147. EXTERN void        Tk_DefineCursor _ANSI_ARGS_((Tk_Window window,
  1148.                 Tk_Cursor cursor));
  1149. EXTERN void        Tk_DeleteAllBindings _ANSI_ARGS_((
  1150.                 Tk_BindingTable bindingTable, ClientData object));
  1151. EXTERN int        Tk_DeleteBinding _ANSI_ARGS_((Tcl_Interp *interp,
  1152.                 Tk_BindingTable bindingTable, ClientData object,
  1153.                 char *eventString));
  1154. EXTERN void        Tk_DeleteBindingTable _ANSI_ARGS_((
  1155.                 Tk_BindingTable bindingTable));
  1156. EXTERN void        Tk_DeleteErrorHandler _ANSI_ARGS_((
  1157.                 Tk_ErrorHandler handler));
  1158. EXTERN void        Tk_DeleteEventHandler _ANSI_ARGS_((Tk_Window token,
  1159.                 unsigned long mask, Tk_EventProc *proc,
  1160.                 ClientData clientData));
  1161. EXTERN void        Tk_DeleteGenericHandler _ANSI_ARGS_((
  1162.                 Tk_GenericProc *proc, ClientData clientData));
  1163. EXTERN void        Tk_DeleteImage _ANSI_ARGS_((Tcl_Interp *interp,
  1164.                 char *name));
  1165. EXTERN void        Tk_DeleteSelHandler _ANSI_ARGS_((Tk_Window tkwin,
  1166.                 Atom selection, Atom target));
  1167. EXTERN void             Tk_DestroyWindow _ANSI_ARGS_((Tk_Window tkwin));
  1168. EXTERN char *        Tk_DisplayName _ANSI_ARGS_((Tk_Window tkwin));
  1169. EXTERN int        Tk_DistanceToTextLayout _ANSI_ARGS_((
  1170.                 Tk_TextLayout layout, int x, int y));
  1171. EXTERN void        Tk_Draw3DPolygon _ANSI_ARGS_((Tk_Window tkwin,
  1172.                 Drawable drawable, Tk_3DBorder border,
  1173.                 XPoint *pointPtr, int numPoints, int borderWidth,
  1174.                 int leftRelief));
  1175. EXTERN void        Tk_Draw3DRectangle _ANSI_ARGS_((Tk_Window tkwin,
  1176.                 Drawable drawable, Tk_3DBorder border, int x,
  1177.                 int y, int width, int height, int borderWidth,
  1178.                 int relief));
  1179. EXTERN void        Tk_DrawChars _ANSI_ARGS_((Display *display,
  1180.                 Drawable drawable, GC gc, Tk_Font tkfont,
  1181.                 CONST char *source, int numChars, int x,
  1182.                 int y));
  1183. EXTERN void        Tk_DrawFocusHighlight _ANSI_ARGS_((Tk_Window tkwin,
  1184.                 GC gc, int width, Drawable drawable));
  1185. EXTERN void        Tk_DrawTextLayout _ANSI_ARGS_((Display *display,
  1186.                 Drawable drawable, GC gc, Tk_TextLayout layout,
  1187.                 int x, int y, int firstChar, int lastChar));
  1188. EXTERN void        Tk_Fill3DPolygon _ANSI_ARGS_((Tk_Window tkwin,
  1189.                 Drawable drawable, Tk_3DBorder border,
  1190.                 XPoint *pointPtr, int numPoints, int borderWidth,
  1191.                 int leftRelief));
  1192. EXTERN void        Tk_Fill3DRectangle _ANSI_ARGS_((Tk_Window tkwin,
  1193.                 Drawable drawable, Tk_3DBorder border, int x,
  1194.                 int y, int width, int height, int borderWidth,
  1195.                 int relief));
  1196. EXTERN Tk_PhotoHandle    Tk_FindPhoto _ANSI_ARGS_((Tcl_Interp *interp,
  1197.                 char *imageName));
  1198. EXTERN Font        Tk_FontId _ANSI_ARGS_((Tk_Font font));
  1199. EXTERN void        Tk_Free3DBorder _ANSI_ARGS_((Tk_3DBorder border));
  1200. EXTERN void        Tk_FreeBitmap _ANSI_ARGS_((Display *display,
  1201.                 Pixmap bitmap));
  1202. EXTERN void        Tk_FreeColor _ANSI_ARGS_((XColor *colorPtr));
  1203. EXTERN void        Tk_FreeColormap _ANSI_ARGS_((Display *display,
  1204.                 Colormap colormap));
  1205. EXTERN void        Tk_FreeCursor _ANSI_ARGS_((Display *display,
  1206.                 Tk_Cursor cursor));
  1207. EXTERN void        Tk_FreeFont _ANSI_ARGS_((Tk_Font));
  1208. EXTERN void        Tk_FreeGC _ANSI_ARGS_((Display *display, GC gc));
  1209. EXTERN void        Tk_FreeImage _ANSI_ARGS_((Tk_Image image));
  1210. EXTERN void        Tk_FreeOptions _ANSI_ARGS_((Tk_ConfigSpec *specs,
  1211.                 char *widgRec, Display *display, int needFlags));
  1212. EXTERN void        Tk_FreePixmap _ANSI_ARGS_((Display *display,
  1213.                 Pixmap pixmap));
  1214. EXTERN void        Tk_FreeTextLayout _ANSI_ARGS_((
  1215.                 Tk_TextLayout textLayout));
  1216. EXTERN void        Tk_FreeXId _ANSI_ARGS_((Display *display, XID xid));
  1217. EXTERN GC        Tk_GCForColor _ANSI_ARGS_((XColor *colorPtr,
  1218.                 Drawable drawable));
  1219. EXTERN void        Tk_GeometryRequest _ANSI_ARGS_((Tk_Window tkwin,
  1220.                 int reqWidth,  int reqHeight));
  1221. EXTERN Tk_3DBorder    Tk_Get3DBorder _ANSI_ARGS_((Tcl_Interp *interp,
  1222.                 Tk_Window tkwin, Tk_Uid colorName));
  1223. EXTERN void        Tk_GetAllBindings _ANSI_ARGS_((Tcl_Interp *interp,
  1224.                 Tk_BindingTable bindingTable, ClientData object));
  1225. EXTERN int        Tk_GetAnchor _ANSI_ARGS_((Tcl_Interp *interp,
  1226.                 char *string, Tk_Anchor *anchorPtr));
  1227. EXTERN char *        Tk_GetAtomName _ANSI_ARGS_((Tk_Window tkwin,
  1228.                 Atom atom));
  1229. EXTERN char *        Tk_GetBinding _ANSI_ARGS_((Tcl_Interp *interp,
  1230.                 Tk_BindingTable bindingTable, ClientData object,
  1231.                 char *eventString));
  1232. EXTERN Pixmap        Tk_GetBitmap _ANSI_ARGS_((Tcl_Interp *interp,
  1233.                 Tk_Window tkwin, Tk_Uid string));
  1234. EXTERN Pixmap        Tk_GetBitmapFromData _ANSI_ARGS_((Tcl_Interp *interp,
  1235.                 Tk_Window tkwin, char *source,
  1236.                 int width, int height));
  1237. EXTERN int        Tk_GetCapStyle _ANSI_ARGS_((Tcl_Interp *interp,
  1238.                 char *string, int *capPtr));
  1239. EXTERN XColor *        Tk_GetColor _ANSI_ARGS_((Tcl_Interp *interp,
  1240.                 Tk_Window tkwin, Tk_Uid name));
  1241. EXTERN XColor *        Tk_GetColorByValue _ANSI_ARGS_((Tk_Window tkwin,
  1242.                 XColor *colorPtr));
  1243. EXTERN Colormap        Tk_GetColormap _ANSI_ARGS_((Tcl_Interp *interp,
  1244.                 Tk_Window tkwin, char *string));
  1245. EXTERN Tk_Cursor    Tk_GetCursor _ANSI_ARGS_((Tcl_Interp *interp,
  1246.                 Tk_Window tkwin, Tk_Uid string));
  1247. EXTERN Tk_Cursor    Tk_GetCursorFromData _ANSI_ARGS_((Tcl_Interp *interp,
  1248.                 Tk_Window tkwin, char *source, char *mask,
  1249.                 int width, int height, int xHot, int yHot,
  1250.                 Tk_Uid fg, Tk_Uid bg));
  1251. EXTERN Tk_Font        Tk_GetFont _ANSI_ARGS_((Tcl_Interp *interp,
  1252.                 Tk_Window tkwin, CONST char *string));
  1253. EXTERN Tk_Font        Tk_GetFontFromObj _ANSI_ARGS_((Tcl_Interp *interp,
  1254.                 Tk_Window tkwin, Tcl_Obj *objPtr));
  1255. EXTERN void        Tk_GetFontMetrics _ANSI_ARGS_((Tk_Font font,
  1256.                 Tk_FontMetrics *fmPtr));
  1257. EXTERN GC        Tk_GetGC _ANSI_ARGS_((Tk_Window tkwin,
  1258.                 unsigned long valueMask, XGCValues *valuePtr));
  1259. /* CYGNUS LOCAL.  */
  1260. EXTERN GC        Tk_GetGCColor _ANSI_ARGS_((Tk_Window tkwin,
  1261.                 unsigned long valueMask, XGCValues *valuePtr,
  1262.                 XColor *foreground, XColor *background));
  1263. EXTERN Tk_Image        Tk_GetImage _ANSI_ARGS_((Tcl_Interp *interp,
  1264.                 Tk_Window tkwin, char *name,
  1265.                 Tk_ImageChangedProc *changeProc,
  1266.                 ClientData clientData));
  1267. EXTERN ClientData    Tk_GetImageMasterData _ANSI_ARGS_ ((Tcl_Interp *interp,
  1268.                 char *name, Tk_ImageType **typePtrPtr));
  1269. EXTERN Tk_ItemType *    Tk_GetItemTypes _ANSI_ARGS_((void));
  1270. EXTERN int        Tk_GetJoinStyle _ANSI_ARGS_((Tcl_Interp *interp,
  1271.                 char *string, int *joinPtr));
  1272. EXTERN int        Tk_GetJustify _ANSI_ARGS_((Tcl_Interp *interp,
  1273.                 char *string, Tk_Justify *justifyPtr));
  1274. EXTERN int        Tk_GetNumMainWindows _ANSI_ARGS_((void));
  1275. EXTERN Tk_Uid        Tk_GetOption _ANSI_ARGS_((Tk_Window tkwin, char *name,
  1276.                 char *className));
  1277. EXTERN int        Tk_GetPixels _ANSI_ARGS_((Tcl_Interp *interp,
  1278.                 Tk_Window tkwin, char *string, int *intPtr));
  1279. EXTERN Pixmap        Tk_GetPixmap _ANSI_ARGS_((Display *display, Drawable d,
  1280.                 int width, int height, int depth));
  1281. EXTERN int        Tk_GetRelief _ANSI_ARGS_((Tcl_Interp *interp,
  1282.                 char *name, int *reliefPtr));
  1283. EXTERN void        Tk_GetRootCoords _ANSI_ARGS_ ((Tk_Window tkwin,
  1284.                 int *xPtr, int *yPtr));
  1285. EXTERN int        Tk_GetScrollInfo _ANSI_ARGS_((Tcl_Interp *interp,
  1286.                 int argc, char **argv, double *dblPtr,
  1287.                 int *intPtr));
  1288. EXTERN int        Tk_GetScreenMM _ANSI_ARGS_((Tcl_Interp *interp,
  1289.                 Tk_Window tkwin, char *string, double *doublePtr));
  1290. EXTERN int        Tk_GetSelection _ANSI_ARGS_((Tcl_Interp *interp,
  1291.                 Tk_Window tkwin, Atom selection, Atom target,
  1292.                 Tk_GetSelProc *proc, ClientData clientData));
  1293. EXTERN Tk_Uid        Tk_GetUid _ANSI_ARGS_((CONST char *string));
  1294. EXTERN Visual *        Tk_GetVisual _ANSI_ARGS_((Tcl_Interp *interp,
  1295.                 Tk_Window tkwin, char *string, int *depthPtr,
  1296.                 Colormap *colormapPtr));
  1297. EXTERN void        Tk_GetVRootGeometry _ANSI_ARGS_((Tk_Window tkwin,
  1298.                 int *xPtr, int *yPtr, int *widthPtr,
  1299.                 int *heightPtr));
  1300. EXTERN int        Tk_Grab _ANSI_ARGS_((Tcl_Interp *interp,
  1301.                 Tk_Window tkwin, int grabGlobal));
  1302. EXTERN void        Tk_HandleEvent _ANSI_ARGS_((XEvent *eventPtr));
  1303. EXTERN Tk_Window          Tk_IdToWindow _ANSI_ARGS_((Display *display,
  1304.                 Window window));
  1305. EXTERN void        Tk_ImageChanged _ANSI_ARGS_((
  1306.                 Tk_ImageMaster master, int x, int y,
  1307.                 int width, int height, int imageWidth,
  1308.                 int imageHeight));
  1309. EXTERN int        Tk_Init _ANSI_ARGS_((Tcl_Interp *interp));
  1310. EXTERN Atom        Tk_InternAtom _ANSI_ARGS_((Tk_Window tkwin,
  1311.                 char *name));
  1312. EXTERN int        Tk_IntersectTextLayout _ANSI_ARGS_((
  1313.                 Tk_TextLayout layout, int x, int y, int width,
  1314.                 int height));
  1315. EXTERN void        Tk_Main _ANSI_ARGS_((int argc, char **argv,
  1316.                 Tcl_AppInitProc *appInitProc));
  1317. EXTERN void        Tk_MainLoop _ANSI_ARGS_((void));
  1318. EXTERN void        Tk_MaintainGeometry _ANSI_ARGS_((Tk_Window slave,
  1319.                 Tk_Window master, int x, int y, int width,
  1320.                 int height));
  1321. EXTERN Tk_Window    Tk_MainWindow _ANSI_ARGS_((Tcl_Interp *interp));
  1322. EXTERN void        Tk_MakeWindowExist _ANSI_ARGS_((Tk_Window tkwin));
  1323. EXTERN void        Tk_ManageGeometry _ANSI_ARGS_((Tk_Window tkwin,
  1324.                 Tk_GeomMgr *mgrPtr, ClientData clientData));
  1325. EXTERN void        Tk_MapWindow _ANSI_ARGS_((Tk_Window tkwin));
  1326. EXTERN int        Tk_MeasureChars _ANSI_ARGS_((Tk_Font tkfont,
  1327.                 CONST char *source, int maxChars, int maxPixels,
  1328.                 int flags, int *lengthPtr));
  1329. EXTERN void        Tk_MoveResizeWindow _ANSI_ARGS_((Tk_Window tkwin,
  1330.                 int x, int y, int width, int height));
  1331. EXTERN void        Tk_MoveWindow _ANSI_ARGS_((Tk_Window tkwin, int x,
  1332.                 int y));
  1333. EXTERN void        Tk_MoveToplevelWindow _ANSI_ARGS_((Tk_Window tkwin,
  1334.                 int x, int y));
  1335. EXTERN char *        Tk_NameOf3DBorder _ANSI_ARGS_((Tk_3DBorder border));
  1336. EXTERN char *        Tk_NameOfAnchor _ANSI_ARGS_((Tk_Anchor anchor));
  1337. EXTERN char *        Tk_NameOfBitmap _ANSI_ARGS_((Display *display,
  1338.                 Pixmap bitmap));
  1339. EXTERN char *        Tk_NameOfCapStyle _ANSI_ARGS_((int cap));
  1340. EXTERN char *        Tk_NameOfColor _ANSI_ARGS_((XColor *colorPtr));
  1341. EXTERN char *        Tk_NameOfCursor _ANSI_ARGS_((Display *display,
  1342.                 Tk_Cursor cursor));
  1343. EXTERN char *        Tk_NameOfFont _ANSI_ARGS_((Tk_Font font));
  1344. EXTERN char *        Tk_NameOfImage _ANSI_ARGS_((
  1345.                 Tk_ImageMaster imageMaster));
  1346. EXTERN char *        Tk_NameOfJoinStyle _ANSI_ARGS_((int join));
  1347. EXTERN char *        Tk_NameOfJustify _ANSI_ARGS_((Tk_Justify justify));
  1348. EXTERN char *        Tk_NameOfRelief _ANSI_ARGS_((int relief));
  1349. EXTERN Tk_Window    Tk_NameToWindow _ANSI_ARGS_((Tcl_Interp *interp,
  1350.                 char *pathName, Tk_Window tkwin));
  1351. EXTERN void        Tk_OwnSelection _ANSI_ARGS_((Tk_Window tkwin,
  1352.                 Atom selection, Tk_LostSelProc *proc,
  1353.                 ClientData clientData));
  1354. EXTERN int        Tk_ParseArgv _ANSI_ARGS_((Tcl_Interp *interp,
  1355.                 Tk_Window tkwin, int *argcPtr, char **argv,
  1356.                 Tk_ArgvInfo *argTable, int flags));
  1357. EXTERN void        Tk_PhotoPutBlock _ANSI_ARGS_((Tk_PhotoHandle handle,
  1358.                 Tk_PhotoImageBlock *blockPtr, int x, int y,
  1359.                 int width, int height));
  1360. EXTERN void        Tk_PhotoPutZoomedBlock _ANSI_ARGS_((
  1361.                 Tk_PhotoHandle handle,
  1362.                 Tk_PhotoImageBlock *blockPtr, int x, int y,
  1363.                 int width, int height, int zoomX, int zoomY,
  1364.                 int subsampleX, int subsampleY));
  1365. EXTERN int        Tk_PhotoGetImage _ANSI_ARGS_((Tk_PhotoHandle handle,
  1366.                 Tk_PhotoImageBlock *blockPtr));
  1367. EXTERN void        Tk_PhotoBlank _ANSI_ARGS_((Tk_PhotoHandle handle));
  1368. EXTERN void        Tk_PhotoExpand _ANSI_ARGS_((Tk_PhotoHandle handle,
  1369.                 int width, int height ));
  1370. EXTERN void        Tk_PhotoGetSize _ANSI_ARGS_((Tk_PhotoHandle handle,
  1371.                 int *widthPtr, int *heightPtr));
  1372. EXTERN void        Tk_PhotoSetSize _ANSI_ARGS_((Tk_PhotoHandle handle,
  1373.                 int width, int height));
  1374. EXTERN int        Tk_PointToChar _ANSI_ARGS_((Tk_TextLayout layout,
  1375.                 int x, int y));
  1376. EXTERN int        Tk_PostscriptFontName _ANSI_ARGS_((Tk_Font tkfont,
  1377.                 Tcl_DString *dsPtr));
  1378. EXTERN void        Tk_PreserveColormap _ANSI_ARGS_((Display *display,
  1379.                 Colormap colormap));
  1380. EXTERN void        Tk_QueueWindowEvent _ANSI_ARGS_((XEvent *eventPtr,
  1381.                 Tcl_QueuePosition position));
  1382. EXTERN void        Tk_RedrawImage _ANSI_ARGS_((Tk_Image image, int imageX,
  1383.                 int imageY, int width, int height,
  1384.                 Drawable drawable, int drawableX, int drawableY));
  1385. EXTERN void        Tk_ResizeWindow _ANSI_ARGS_((Tk_Window tkwin,
  1386.                 int width, int height));
  1387. EXTERN int        Tk_RestackWindow _ANSI_ARGS_((Tk_Window tkwin,
  1388.                 int aboveBelow, Tk_Window other));
  1389. EXTERN Tk_RestrictProc *Tk_RestrictEvents _ANSI_ARGS_((Tk_RestrictProc *proc,
  1390.                 ClientData arg, ClientData *prevArgPtr));
  1391. EXTERN int        Tk_SafeInit _ANSI_ARGS_((Tcl_Interp *interp));
  1392. EXTERN char *        Tk_SetAppName _ANSI_ARGS_((Tk_Window tkwin,
  1393.                 char *name));
  1394. EXTERN void        Tk_SetBackgroundFromBorder _ANSI_ARGS_((
  1395.                 Tk_Window tkwin, Tk_3DBorder border));
  1396. EXTERN void        Tk_SetClass _ANSI_ARGS_((Tk_Window tkwin,
  1397.                 char *className));
  1398. EXTERN void        Tk_SetGrid _ANSI_ARGS_((Tk_Window tkwin,
  1399.                 int reqWidth, int reqHeight, int gridWidth,
  1400.                 int gridHeight));
  1401. EXTERN void        Tk_SetInternalBorder _ANSI_ARGS_((Tk_Window tkwin,
  1402.                 int width));
  1403. EXTERN void        Tk_SetWindowBackground _ANSI_ARGS_((Tk_Window tkwin,
  1404.                 unsigned long pixel));
  1405. EXTERN void        Tk_SetWindowBackgroundPixmap _ANSI_ARGS_((
  1406.                 Tk_Window tkwin, Pixmap pixmap));
  1407. EXTERN void        Tk_SetWindowBorder _ANSI_ARGS_((Tk_Window tkwin,
  1408.                 unsigned long pixel));
  1409. EXTERN void        Tk_SetWindowBorderWidth _ANSI_ARGS_((Tk_Window tkwin,
  1410.                 int width));
  1411. EXTERN void        Tk_SetWindowBorderPixmap _ANSI_ARGS_((Tk_Window tkwin,
  1412.                 Pixmap pixmap));
  1413. EXTERN void        Tk_SetWindowColormap _ANSI_ARGS_((Tk_Window tkwin,
  1414.                 Colormap colormap));
  1415. EXTERN int        Tk_SetWindowVisual _ANSI_ARGS_((Tk_Window tkwin,
  1416.                 Visual *visual, int depth,
  1417.                 Colormap colormap));
  1418. EXTERN void        Tk_SizeOfBitmap _ANSI_ARGS_((Display *display,
  1419.                 Pixmap bitmap, int *widthPtr,
  1420.                 int *heightPtr));
  1421. EXTERN void        Tk_SizeOfImage _ANSI_ARGS_((Tk_Image image,
  1422.                 int *widthPtr, int *heightPtr));
  1423. EXTERN int        Tk_StrictMotif _ANSI_ARGS_((Tk_Window tkwin));
  1424. EXTERN void        Tk_TextLayoutToPostscript _ANSI_ARGS_((
  1425.                 Tcl_Interp *interp, Tk_TextLayout layout));
  1426. EXTERN int        Tk_TextWidth _ANSI_ARGS_((Tk_Font font,
  1427.                 CONST char *string, int numChars));
  1428. EXTERN void        Tk_UndefineCursor _ANSI_ARGS_((Tk_Window window));
  1429. EXTERN void        Tk_UnderlineChars _ANSI_ARGS_((Display *display,
  1430.                 Drawable drawable, GC gc, Tk_Font tkfont,
  1431.                 CONST char *source, int x, int y, int firstChar,
  1432.                 int lastChar));
  1433. EXTERN void        Tk_UnderlineTextLayout _ANSI_ARGS_((
  1434.                 Display *display, Drawable drawable, GC gc,
  1435.                 Tk_TextLayout layout, int x, int y,
  1436.                 int underline));
  1437. EXTERN void        Tk_Ungrab _ANSI_ARGS_((Tk_Window tkwin));
  1438. EXTERN void        Tk_UnmaintainGeometry _ANSI_ARGS_((Tk_Window slave,
  1439.                 Tk_Window master));
  1440. EXTERN void        Tk_UnmapWindow _ANSI_ARGS_((Tk_Window tkwin));
  1441. EXTERN void        Tk_UnsetGrid _ANSI_ARGS_((Tk_Window tkwin));
  1442. EXTERN void        Tk_UpdatePointer _ANSI_ARGS_((Tk_Window tkwin,
  1443.                 int x, int y, int state));
  1444.  
  1445. /*
  1446.  * Tcl commands exported by Tk:
  1447.  */
  1448.  
  1449. EXTERN int        Tk_AfterCmd _ANSI_ARGS_((ClientData clientData,
  1450.                 Tcl_Interp *interp, int argc, char **argv));
  1451. EXTERN int        Tk_BellCmd _ANSI_ARGS_((ClientData clientData,
  1452.                 Tcl_Interp *interp, int argc, char **argv));
  1453. EXTERN int        Tk_BindCmd _ANSI_ARGS_((ClientData clientData,
  1454.                 Tcl_Interp *interp, int argc, char **argv));
  1455. EXTERN int        Tk_BindtagsCmd _ANSI_ARGS_((ClientData clientData,
  1456.                 Tcl_Interp *interp, int argc, char **argv));
  1457. EXTERN int        Tk_ButtonCmd _ANSI_ARGS_((ClientData clientData,
  1458.                 Tcl_Interp *interp, int argc, char **argv));
  1459. EXTERN int        Tk_CanvasCmd _ANSI_ARGS_((ClientData clientData,
  1460.                 Tcl_Interp *interp, int argc, char **argv));
  1461. EXTERN int        Tk_CheckbuttonCmd _ANSI_ARGS_((ClientData clientData,
  1462.                 Tcl_Interp *interp, int argc, char **argv));
  1463. EXTERN int        Tk_ClipboardCmd _ANSI_ARGS_((ClientData clientData,
  1464.                 Tcl_Interp *interp, int argc, char **argv));
  1465. EXTERN int              Tk_ChooseColorCmd _ANSI_ARGS_((ClientData clientData,
  1466.                             Tcl_Interp *interp, int argc, char **argv));
  1467. EXTERN int              Tk_ChooseFontCmd _ANSI_ARGS_((ClientData clientData,
  1468.                             Tcl_Interp *interp, int argc, char **argv));
  1469. EXTERN int        Tk_DestroyCmd _ANSI_ARGS_((ClientData clientData,
  1470.                 Tcl_Interp *interp, int argc, char **argv));
  1471. EXTERN int        Tk_EntryCmd _ANSI_ARGS_((ClientData clientData,
  1472.                 Tcl_Interp *interp, int argc, char **argv));
  1473. EXTERN int        Tk_EventCmd _ANSI_ARGS_((ClientData clientData,
  1474.                 Tcl_Interp *interp, int argc, char **argv));
  1475. EXTERN int        Tk_FileeventCmd _ANSI_ARGS_((ClientData clientData,
  1476.                 Tcl_Interp *interp, int argc, char **argv));
  1477. EXTERN int        Tk_FrameCmd _ANSI_ARGS_((ClientData clientData,
  1478.                 Tcl_Interp *interp, int argc, char **argv));
  1479. EXTERN int        Tk_FocusCmd _ANSI_ARGS_((ClientData clientData,
  1480.                 Tcl_Interp *interp, int argc, char **argv));
  1481. EXTERN int        Tk_FontObjCmd _ANSI_ARGS_((ClientData clientData,
  1482.                 Tcl_Interp *interp, int objc,
  1483.                 Tcl_Obj *CONST objv[]));
  1484. EXTERN int              Tk_GetOpenFileCmd _ANSI_ARGS_((ClientData clientData,
  1485.                             Tcl_Interp *interp, int argc, char **argv));
  1486. EXTERN int              Tk_GetSaveFileCmd _ANSI_ARGS_((ClientData clientData,
  1487.                             Tcl_Interp *interp, int argc, char **argv));
  1488. EXTERN int        Tk_GrabCmd _ANSI_ARGS_((ClientData clientData,
  1489.                 Tcl_Interp *interp, int argc, char **argv));
  1490. EXTERN int        Tk_GridCmd _ANSI_ARGS_((ClientData clientData,
  1491.                 Tcl_Interp *interp, int argc, char **argv));
  1492. EXTERN int        Tk_ImageCmd _ANSI_ARGS_((ClientData clientData,
  1493.                 Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[]));
  1494. EXTERN int        Tk_LabelCmd _ANSI_ARGS_((ClientData clientData,
  1495.                 Tcl_Interp *interp, int argc, char **argv));
  1496. EXTERN int        Tk_ListboxCmd _ANSI_ARGS_((ClientData clientData,
  1497.                 Tcl_Interp *interp, int argc, char **argv));
  1498. EXTERN int        Tk_LowerCmd _ANSI_ARGS_((ClientData clientData,
  1499.                 Tcl_Interp *interp, int argc, char **argv));
  1500. EXTERN int        Tk_MenuCmd _ANSI_ARGS_((ClientData clientData,
  1501.                 Tcl_Interp *interp, int argc, char **argv));
  1502. EXTERN int        Tk_MenubuttonCmd _ANSI_ARGS_((ClientData clientData,
  1503.                 Tcl_Interp *interp, int argc, char **argv));
  1504. EXTERN int              Tk_MessageBoxCmd _ANSI_ARGS_((ClientData clientData,
  1505.                             Tcl_Interp *interp, int argc, char **argv));
  1506. EXTERN int        Tk_MessageCmd _ANSI_ARGS_((ClientData clientData,
  1507.                 Tcl_Interp *interp, int argc, char **argv));
  1508. EXTERN int        Tk_OptionCmd _ANSI_ARGS_((ClientData clientData,
  1509.                 Tcl_Interp *interp, int argc, char **argv));
  1510. EXTERN int        Tk_PackCmd _ANSI_ARGS_((ClientData clientData,
  1511.                 Tcl_Interp *interp, int argc, char **argv));
  1512. EXTERN int        Tk_PlaceCmd _ANSI_ARGS_((ClientData clientData,
  1513.                 Tcl_Interp *interp, int argc, char **argv));
  1514. EXTERN int        Tk_RadiobuttonCmd _ANSI_ARGS_((ClientData clientData,
  1515.                 Tcl_Interp *interp, int argc, char **argv));
  1516. EXTERN int        Tk_RaiseCmd _ANSI_ARGS_((ClientData clientData,
  1517.                 Tcl_Interp *interp, int argc, char **argv));
  1518. EXTERN int        Tk_ScaleCmd _ANSI_ARGS_((ClientData clientData,
  1519.                 Tcl_Interp *interp, int argc, char **argv));
  1520. EXTERN int        Tk_ScrollbarCmd _ANSI_ARGS_((ClientData clientData,
  1521.                 Tcl_Interp *interp, int argc, char **argv));
  1522. EXTERN int        Tk_SelectionCmd _ANSI_ARGS_((ClientData clientData,
  1523.                 Tcl_Interp *interp, int argc, char **argv));
  1524. EXTERN int        Tk_SendCmd _ANSI_ARGS_((ClientData clientData,
  1525.                 Tcl_Interp *interp, int argc, char **argv));
  1526. EXTERN int        Tk_TextCmd _ANSI_ARGS_((ClientData clientData,
  1527.                 Tcl_Interp *interp, int argc, char **argv));
  1528. EXTERN int        Tk_TkObjCmd _ANSI_ARGS_((ClientData clientData,
  1529.                 Tcl_Interp *interp, int objc,
  1530.                 Tcl_Obj *CONST objv[]));
  1531. EXTERN int        Tk_TkwaitCmd _ANSI_ARGS_((ClientData clientData,
  1532.                 Tcl_Interp *interp, int argc, char **argv));
  1533. EXTERN int        Tk_ToplevelCmd _ANSI_ARGS_((ClientData clientData,
  1534.                 Tcl_Interp *interp, int argc, char **argv));
  1535. EXTERN int        Tk_UpdateCmd _ANSI_ARGS_((ClientData clientData,
  1536.                 Tcl_Interp *interp, int argc, char **argv));
  1537. EXTERN int        Tk_WinfoObjCmd _ANSI_ARGS_((ClientData clientData,
  1538.                 Tcl_Interp *interp, int objc,
  1539.                 Tcl_Obj *CONST objv[]));
  1540. EXTERN int        Tk_WmCmd _ANSI_ARGS_((ClientData clientData,
  1541.                 Tcl_Interp *interp, int argc, char **argv));
  1542.  
  1543. #endif /* RESOURCE_INCLUDED */
  1544. #endif /* _TK */
  1545.